﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using static System.Console;

namespace 事件2
{
    class Program
    {
        static void Main(string[] args)
        {

            Action a = () => Console.WriteLine("hello world");
            Action b = Func1;

            // 泛型参数描述了函数的入参的类型
            Action<int> c = Func3;

            a.Invoke();
            b.Invoke();
            c(10);
            c.Invoke(100);
            ReadKey();
        }

        static void Func1()
        {
            WriteLine("func1");
        }
        static void Func2()
        {
            WriteLine("func2");
        }

        static void Func3(int a)
        {
            WriteLine(a + 10);
        }
    }
}
